import request from '@/utils/request'

const baseURL = '/government'

/**
 * 查询月重点指标综合分析
 * @param {{year: number; month: number}} params 
 * @returns {Promise<{
 *  code: string;
 *  message: string;
 *  data: {
 *    districtBelong: string,
 *    comprehensiveEnergyConsumption: string,
 *    comprehensiveEnergyConsumptionYearOnYear: string,
 *    comprehensiveEnergyConsumptionMonthOnMonth: string,
 *    industrialOutput: string,
 *    industrialOutputYearOnYear: string,
 *    industrialOutputMonthOnMonth: string,
 *    energyUsed: string,
 *    energyUsedYearOnYear: string,
 *    energyUsedMonthOnMonth: string,
 *    gasConsumption: string,
 *    gasConsumptionYearOnYear: string,
 *    gasConsumptionMonthOnMonth: string
 *  }[]
 * }>}
 */
export function loadMonthKeyIndicators (params) {
  return request({
    url: `${baseURL}/loadMonthKeyIndicators`,
    params
  })
}

/**
 * 查询年重点指标综合分析
 * @param {{year: number}} params 
 * @returns {Promise<{
 *  code: string;
 *  message: string;
 *  data: {
 *    districtBelong: string,
 *    comprehensiveEnergyConsumption: string,
 *    comprehensiveEnergyConsumptionYearOnYear: string,
 *    comprehensiveEnergyConsumptionMonthOnMonth: string,
 *    industrialOutput: string,
 *    industrialOutputYearOnYear: string,
 *    industrialOutputMonthOnMonth: string,
 *    energyUsed: string,
 *    energyUsedYearOnYear: string,
 *    energyUsedMonthOnMonth: string,
 *    gasConsumption: string,
 *    gasConsumptionYearOnYear: string,
 *    gasConsumptionMonthOnMonth: string
 *  }[]
 * }>}
 */
export function loadYearKeyIndicators (params) {
  return request({
    url: `${baseURL}/loadYearKeyIndicators`,
    params,
  })
}